<?php

/*

Games index (games.php)

*/

$rank_check = 1;
$page_title = "Games";
include "header.inc.php";

print "$openHTML";

$findPage = fetch("SELECT * FROM game_pages WHERE page_title = '$page_title' AND game = '$game'");
if (!$findPage[id])
{
	print "<P>Welcome to the $gameName2 game room. Please choose any of the
games below to start having tons of fun!</P><P><FONT COLOR=\"#FF0000\"><B>NEW!</B></FONT> Learn <A HREF=\"$base_url/cheats.php?game=$game\">how to cheat</A> in your favorite games.</P>";
}
else
{
	include "showpage.inc.php";
	print "$findPage[page_info]";
}



ECHO <<<END

<center>
<table width="100" border="0" cellspacing="5" cellpadding="0">
  <tr align="left" valign="top"> 
    <td><a href="battle_center.php?game=$game"><img src="images/battlenow.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="drop_box.php?game=$game"><img src="images/dropbox.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="daily_item.php?game=$game"><img src="images/freeitems.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="lottery.php?game=$game"><img src="images/lottery.jpg" width="161" height="144" border="0"></a></td>
  </tr>
  <tr align="left" valign="top"> 
    <td><a href="random.php?game=$game"><img src="images/numberguess.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="price_game.php?game=$game"><img src="images/priceguess.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="quests.php?game=$game"><img src="images/quest.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="random_points.php?game=$game"><img src="images/randomcredits.jpg" width="161" height="144" border="0"></a></td>
  </tr>
  <tr align="left" valign="top"> 
    <td><a href="search_for_pets.php?game=$game"><img src="images/vpetssearching.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="fish_for_pets.php?game=$game"><img src="images/vpetsfishing.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="slots.php?game=$game"><img src="images/slot.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="trivia.php?game=$game"><img src="images/trivia.jpg" width="161" height="144" border="0"></a></td>
  </tr>
  <tr align="left" valign="top"> 
    <td><a href="refer.php?game=$game"><img src="images/referralcontest.jpg" width="161" height="144" border="0"></a></td>
    <td><a href="snakeeyes.php?game=$game"><img src="images/snakeeye.jpg" width="161" height="144" border="0"></a></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</center>

$closeHTML
END;

?>